package very.util.play

import com.github.tototoshi.play2.json4s.Json4s
import org.json4s.Formats
import play.api.mvc.{BaseController, ControllerComponents}
import very.util.response.ResponseFormat
import ws.very.util.json.JsonHelperWithDoubleMode

import scala.concurrent.ExecutionContext
//formats 需要外部注入，ResponseFormat 不同应用可能需要不一样格式
abstract class Controller(
    implicit protected val ec: ExecutionContext,
    implicit protected val controllerComponents: ControllerComponents,
    implicit protected val json4s: Json4s,
    implicit protected override val formats: Formats,
) extends ResponseFormat
    with BaseController
    with JsonHelperWithDoubleMode {}
